#/usr/bin/bash

python=$(which python 2> /dev/null)
if [ -z $python ];then
    wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz
    tar -vxzf Python-2.7.5.tgz
    cd Python-2.7.5
    ./configure
    make
    make install
    cd ..
    rm -rf Python-2.7.5
fi

#python-ctype
python=$(which h2xml.py 2> /dev/null)
if [ -z $python ];then
    svn co http://svn.python.org/projects/ctypes/trunk/ctypeslib
    cd ctypeslib
    python setup.py install
    cd ..
    rm -rf ctypeslib
fi

